!!!
%html{:lang => "en", "xml:lang" => "en", :xmlns => "http://www.w3.org/1999/xhtml"}
  %head
    %meta{:content => "text/html; charset=utf-8", "http-equiv" => "Content-Type"}/
    %title Release Deployed - #{display_name}
  %body
    %style
      :sass
        $body_from: #efefef
        $body_to: #aeaeae

        *
          margin: 0
          padding: 0

        html, body
          font: 0.9em Helvetica, Verdana, Arial, sans-serif
          background: #323840
          background: -webkit-gradient(linear, left top, left bottom, from($body_from), to($body_to))
          background: -moz-linear-gradient(top, $body_from, $body_to)
          filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#323840', endColorstr='#223880')

        #header
          background: #323840
          background: -webkit-gradient(linear, left top, left bottom, from(#323840), to(#223880))
          background: -moz-linear-gradient(top, #323840, #223880)
          filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#323840', endColorstr='#223880')
          padding: 14px 0 7px
          border-bottom: solid 0.5em #000

          #panel
            margin-left: 16%
            width: 600px
            padding: 1em

            a
              color: white
              font-size: 3em
              font-weight: bold
              text-decoration: none
              text-shadow: 0 2px 0 rgba(0,0,0,0.2)

        #content
          margin-top: 2em
          margin-left: 16%
          width: 66%
          background: #fff
          border: 1px solid #444
          -webkit-border-radius: 8px
          -moz-border-radius: 8px
          border-radius: 8px
          padding: 1.5em
          -webkit-box-shadow: 3px 3px 0 #222
          -moz-box-shadow: 3px 3px 0 #222
          box-shadow: 3px 3px 0 #222
          background: #1b2f30 url(#{image_file 'paper_2.png'})

          h1
            margin-bottom: 1em
          
          h2, p
            margin: 1em 0

          .story
            margin: 0.6em 0.4em
            border: 1px solid #999
            -webkit-border-radius: 4px
            -moz-border-radius: 4px
            border-radius: 4px
            padding: 0.4em
            overflow: hidden
            background: #e0e0e0
            background: -webkit-gradient(linear, left top, left bottom, from(#fefefe), to(#e0e0e0))
            background: -moz-linear-gradient(top, #fefefe, #e0e0e0)
            filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fefefe', endColorstr='#e0e0e0')

            .bug
              height: 1em

            .feature
              height: 3em

              .type
                float: right

            .title
              margin: 0.2em 0
              font-weight: bold

              a
                text-decoration: none

        #footer
          border: 1px solid #000
          margin-top: 2em
          margin-bottom: 2em
          margin-left: 16%
          width: 66%
          padding: 1.5em
          font-size: 0.5em
          background: #000
          color: #fff
          -webkit-border-radius: 8px
          -moz-border-radius: 8px
          border-radius: 8px
          -webkit-box-shadow: 3px 3px 0 #222
          -moz-box-shadow: 3px 3px 0 #222
          box-shadow: 3px 3px 0 #222

%body
  #header
    #panel
      %a{:href => 'http://github.com/excepttheweasel/release_party'} Release Party

  #content
    %h1 #{display_name} was deployed
    %p
      At #{release_finished.strftime('%I:%M%p')} a #{stage} release of #{display_name} was
      deployed to
      %a{:href => domain}= domain
      by #{user}.
    %h2 Stories delivered
    - if finished_stories.empty?
      %p No features were delivered in this release.
    - else
      %p
        The following bugs and features have been completed and made available
        for acceptance testing.
      %p
        You can accept or reject features by clicking on the story id and
        pressing 'Accept' or 'Reject' respectively, or you can visit the project
        page
        %a{:href => "http://pivotaltracker.com/projects/#{project_id}/"} here
        = '.'

      #features
        - finished_stories.each do |story|
          .story[story]
            .feature
              .type
                #{story.story_type.capitalize}
              .title
                %a{:href => story.url, :target => '_blank'}= story.id
                = '-'
                = story.name
              .description= story.description
    %h2 Known bugs
    - if known_bugs.empty?
      %p There were no known bugs at the time of this release.
    - else
      #known_bugs
        - known_bugs.each do |story|
          .story[story]
            .bug
              .title
                %a{:href => story.url, :target => '_blank'}= story.id
                = '-'
                = story.name
    - if release_notes
      %h2 Release notes
      #release_notes
        %p= release_notes

  #footer
    %h2 This notice was produced with Release Party at #{release_finished}
